Lokasi ngalangkungan proxy:   [ UP ]  
[Ngawartoskeun bug]   [Panyetelan cookie]                
Skip to content

Read file modes from the git tree in the permission check - #74

Merged
thespad merged 1 commit into
linuxserver:v1from
junkerderprovinz:fix/perm-check-without-checkout
Nov 15, 2026
Merged

thespad merged 1 commit into
linuxserver:v1from
junkerderprovinz:fix/perm-check-without-checkout

Conversation

@junkerderprovinz

Copy link
Copy Markdown
Contributor

Since actions/checkout v7, the permission check fails on fork PRs that touch run, finish or check files: checkout refuses a fork's head in a pull_request_target workflow, so the job stops before it reads any file (#72).

The check only needs file modes. The git trees API returns them for the head commit, and that works for fork commits too because the base repository has them under refs/pull/N/head. This drops the checkout step, so the job no longer fetches fork code at all. The callers stay as they are. The annotations keep their title and message, and the path loses its leading ./.

I tested it with a PR between two branches of my fork: this run fails on a run and a finish stored as 100644 and lets through the 100755 run, a symlinked check and a file named runner. This run passes once the modes are fixed. For fork heads I ran the step's script against docker-swag#617, whose check currently fails on the checkout refusal, and against a5272e08 from docker-baseimage-selkies#190. Both report All perms look good.

@junkerderprovinz

Copy link
Copy Markdown
Contributor Author

Hi! Just a friendly nudge in case this one slipped through. The permission check still fails on fork PRs that touch run, finish or check files (#72), and this change gets it working again without checking out any fork code. Happy to adjust anything if you'd prefer a different approach. Thanks for taking a look!

@github-project-automation github-project-automation Bot moved this from PRs to PRs Approved in Issue & PR Tracker Nov 15, 2026
@thespad
thespad merged commit 39a76e5 into linuxserver:v1 Nov 15, 2026
2 checks passed
@LinuxServer-CI LinuxServer-CI moved this from PRs Approved to Done in Issue & PR Tracker Nov 15, 2026
@junkerderprovinz
junkerderprovinz deleted the fix/perm-check-without-checkout branch November 28, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

2 participants